Optimal. Leaf size=503 \[ \frac{b n \text{PolyLog}\left (2,-\frac{\sqrt{g} (d+e x)}{e \sqrt{-f}-d \sqrt{g}}\right )}{4 (-f)^{3/2} \sqrt{g}}-\frac{b n \text{PolyLog}\left (2,\frac{\sqrt{g} (d+e x)}{d \sqrt{g}+e \sqrt{-f}}\right )}{4 (-f)^{3/2} \sqrt{g}}-\frac{a+b \log \left (c (d+e x)^n\right )}{4 f \sqrt{g} \left (\sqrt{-f}-\sqrt{g} x\right )}+\frac{a+b \log \left (c (d+e x)^n\right )}{4 f \sqrt{g} \left (\sqrt{-f}+\sqrt{g} x\right )}-\frac{\log \left (\frac{e \left (\sqrt{-f}-\sqrt{g} x\right )}{d \sqrt{g}+e \sqrt{-f}}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{4 (-f)^{3/2} \sqrt{g}}+\frac{\log \left (\frac{e \left (\sqrt{-f}+\sqrt{g} x\right )}{e \sqrt{-f}-d \sqrt{g}}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{4 (-f)^{3/2} \sqrt{g}}+\frac{b e n \log (d+e x)}{4 f \sqrt{g} \left (d \sqrt{g}+e \sqrt{-f}\right )}+\frac{b e n \log (d+e x)}{4 \sqrt{g} \left (d f \sqrt{g}+e (-f)^{3/2}\right )}-\frac{b e n \log \left (\sqrt{-f}-\sqrt{g} x\right )}{4 f \sqrt{g} \left (d \sqrt{g}+e \sqrt{-f}\right )}-\frac{b e n \log \left (\sqrt{-f}+\sqrt{g} x\right )}{4 \sqrt{g} \left (d f \sqrt{g}+e (-f)^{3/2}\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.393576, antiderivative size = 503, normalized size of antiderivative = 1., number of steps used = 18, number of rules used = 7, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.292, Rules used = {2409, 2395, 36, 31, 2394, 2393, 2391} \[ \frac{b n \text{PolyLog}\left (2,-\frac{\sqrt{g} (d+e x)}{e \sqrt{-f}-d \sqrt{g}}\right )}{4 (-f)^{3/2} \sqrt{g}}-\frac{b n \text{PolyLog}\left (2,\frac{\sqrt{g} (d+e x)}{d \sqrt{g}+e \sqrt{-f}}\right )}{4 (-f)^{3/2} \sqrt{g}}-\frac{a+b \log \left (c (d+e x)^n\right )}{4 f \sqrt{g} \left (\sqrt{-f}-\sqrt{g} x\right )}+\frac{a+b \log \left (c (d+e x)^n\right )}{4 f \sqrt{g} \left (\sqrt{-f}+\sqrt{g} x\right )}-\frac{\log \left (\frac{e \left (\sqrt{-f}-\sqrt{g} x\right )}{d \sqrt{g}+e \sqrt{-f}}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{4 (-f)^{3/2} \sqrt{g}}+\frac{\log \left (\frac{e \left (\sqrt{-f}+\sqrt{g} x\right )}{e \sqrt{-f}-d \sqrt{g}}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{4 (-f)^{3/2} \sqrt{g}}+\frac{b e n \log (d+e x)}{4 f \sqrt{g} \left (d \sqrt{g}+e \sqrt{-f}\right )}+\frac{b e n \log (d+e x)}{4 \sqrt{g} \left (d f \sqrt{g}+e (-f)^{3/2}\right )}-\frac{b e n \log \left (\sqrt{-f}-\sqrt{g} x\right )}{4 f \sqrt{g} \left (d \sqrt{g}+e \sqrt{-f}\right )}-\frac{b e n \log \left (\sqrt{-f}+\sqrt{g} x\right )}{4 \sqrt{g} \left (d f \sqrt{g}+e (-f)^{3/2}\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2409
Rule 2395
Rule 36
Rule 31
Rule 2394
Rule 2393
Rule 2391
Rubi steps
\begin{align*} \int \frac{a+b \log \left (c (d+e x)^n\right )}{\left (f+g x^2\right )^2} \, dx &=\int \left (-\frac{g \left (a+b \log \left (c (d+e x)^n\right )\right )}{4 f \left (\sqrt{-f} \sqrt{g}-g x\right )^2}-\frac{g \left (a+b \log \left (c (d+e x)^n\right )\right )}{4 f \left (\sqrt{-f} \sqrt{g}+g x\right )^2}-\frac{g \left (a+b \log \left (c (d+e x)^n\right )\right )}{2 f \left (-f g-g^2 x^2\right )}\right ) \, dx\\ &=-\frac{g \int \frac{a+b \log \left (c (d+e x)^n\right )}{\left (\sqrt{-f} \sqrt{g}-g x\right )^2} \, dx}{4 f}-\frac{g \int \frac{a+b \log \left (c (d+e x)^n\right )}{\left (\sqrt{-f} \sqrt{g}+g x\right )^2} \, dx}{4 f}-\frac{g \int \frac{a+b \log \left (c (d+e x)^n\right )}{-f g-g^2 x^2} \, dx}{2 f}\\ &=-\frac{a+b \log \left (c (d+e x)^n\right )}{4 f \sqrt{g} \left (\sqrt{-f}-\sqrt{g} x\right )}+\frac{a+b \log \left (c (d+e x)^n\right )}{4 f \sqrt{g} \left (\sqrt{-f}+\sqrt{g} x\right )}-\frac{g \int \left (-\frac{\sqrt{-f} \left (a+b \log \left (c (d+e x)^n\right )\right )}{2 f g \left (\sqrt{-f}-\sqrt{g} x\right )}-\frac{\sqrt{-f} \left (a+b \log \left (c (d+e x)^n\right )\right )}{2 f g \left (\sqrt{-f}+\sqrt{g} x\right )}\right ) \, dx}{2 f}+\frac{(b e n) \int \frac{1}{(d+e x) \left (\sqrt{-f} \sqrt{g}-g x\right )} \, dx}{4 f}-\frac{(b e n) \int \frac{1}{(d+e x) \left (\sqrt{-f} \sqrt{g}+g x\right )} \, dx}{4 f}\\ &=-\frac{a+b \log \left (c (d+e x)^n\right )}{4 f \sqrt{g} \left (\sqrt{-f}-\sqrt{g} x\right )}+\frac{a+b \log \left (c (d+e x)^n\right )}{4 f \sqrt{g} \left (\sqrt{-f}+\sqrt{g} x\right )}+\frac{\int \frac{a+b \log \left (c (d+e x)^n\right )}{\sqrt{-f}-\sqrt{g} x} \, dx}{4 (-f)^{3/2}}+\frac{\int \frac{a+b \log \left (c (d+e x)^n\right )}{\sqrt{-f}+\sqrt{g} x} \, dx}{4 (-f)^{3/2}}+\frac{\left (b e^2 n\right ) \int \frac{1}{d+e x} \, dx}{4 f \left (e \sqrt{-f}+d \sqrt{g}\right ) \sqrt{g}}+\frac{\left (b e^2 n\right ) \int \frac{1}{d+e x} \, dx}{4 \left (e (-f)^{3/2}+d f \sqrt{g}\right ) \sqrt{g}}+\frac{\left (b e \sqrt{g} n\right ) \int \frac{1}{\sqrt{-f} \sqrt{g}+g x} \, dx}{4 f \left (e \sqrt{-f}-d \sqrt{g}\right )}+\frac{\left (b e \sqrt{g} n\right ) \int \frac{1}{\sqrt{-f} \sqrt{g}-g x} \, dx}{4 f \left (e \sqrt{-f}+d \sqrt{g}\right )}\\ &=\frac{b e n \log (d+e x)}{4 f \left (e \sqrt{-f}+d \sqrt{g}\right ) \sqrt{g}}+\frac{b e n \log (d+e x)}{4 \left (e (-f)^{3/2}+d f \sqrt{g}\right ) \sqrt{g}}-\frac{a+b \log \left (c (d+e x)^n\right )}{4 f \sqrt{g} \left (\sqrt{-f}-\sqrt{g} x\right )}+\frac{a+b \log \left (c (d+e x)^n\right )}{4 f \sqrt{g} \left (\sqrt{-f}+\sqrt{g} x\right )}-\frac{b e n \log \left (\sqrt{-f}-\sqrt{g} x\right )}{4 f \left (e \sqrt{-f}+d \sqrt{g}\right ) \sqrt{g}}-\frac{\left (a+b \log \left (c (d+e x)^n\right )\right ) \log \left (\frac{e \left (\sqrt{-f}-\sqrt{g} x\right )}{e \sqrt{-f}+d \sqrt{g}}\right )}{4 (-f)^{3/2} \sqrt{g}}-\frac{b e n \log \left (\sqrt{-f}+\sqrt{g} x\right )}{4 \left (e (-f)^{3/2}+d f \sqrt{g}\right ) \sqrt{g}}+\frac{\left (a+b \log \left (c (d+e x)^n\right )\right ) \log \left (\frac{e \left (\sqrt{-f}+\sqrt{g} x\right )}{e \sqrt{-f}-d \sqrt{g}}\right )}{4 (-f)^{3/2} \sqrt{g}}+\frac{(b e n) \int \frac{\log \left (\frac{e \left (\sqrt{-f}-\sqrt{g} x\right )}{e \sqrt{-f}+d \sqrt{g}}\right )}{d+e x} \, dx}{4 (-f)^{3/2} \sqrt{g}}-\frac{(b e n) \int \frac{\log \left (\frac{e \left (\sqrt{-f}+\sqrt{g} x\right )}{e \sqrt{-f}-d \sqrt{g}}\right )}{d+e x} \, dx}{4 (-f)^{3/2} \sqrt{g}}\\ &=\frac{b e n \log (d+e x)}{4 f \left (e \sqrt{-f}+d \sqrt{g}\right ) \sqrt{g}}+\frac{b e n \log (d+e x)}{4 \left (e (-f)^{3/2}+d f \sqrt{g}\right ) \sqrt{g}}-\frac{a+b \log \left (c (d+e x)^n\right )}{4 f \sqrt{g} \left (\sqrt{-f}-\sqrt{g} x\right )}+\frac{a+b \log \left (c (d+e x)^n\right )}{4 f \sqrt{g} \left (\sqrt{-f}+\sqrt{g} x\right )}-\frac{b e n \log \left (\sqrt{-f}-\sqrt{g} x\right )}{4 f \left (e \sqrt{-f}+d \sqrt{g}\right ) \sqrt{g}}-\frac{\left (a+b \log \left (c (d+e x)^n\right )\right ) \log \left (\frac{e \left (\sqrt{-f}-\sqrt{g} x\right )}{e \sqrt{-f}+d \sqrt{g}}\right )}{4 (-f)^{3/2} \sqrt{g}}-\frac{b e n \log \left (\sqrt{-f}+\sqrt{g} x\right )}{4 \left (e (-f)^{3/2}+d f \sqrt{g}\right ) \sqrt{g}}+\frac{\left (a+b \log \left (c (d+e x)^n\right )\right ) \log \left (\frac{e \left (\sqrt{-f}+\sqrt{g} x\right )}{e \sqrt{-f}-d \sqrt{g}}\right )}{4 (-f)^{3/2} \sqrt{g}}-\frac{(b n) \operatorname{Subst}\left (\int \frac{\log \left (1+\frac{\sqrt{g} x}{e \sqrt{-f}-d \sqrt{g}}\right )}{x} \, dx,x,d+e x\right )}{4 (-f)^{3/2} \sqrt{g}}+\frac{(b n) \operatorname{Subst}\left (\int \frac{\log \left (1-\frac{\sqrt{g} x}{e \sqrt{-f}+d \sqrt{g}}\right )}{x} \, dx,x,d+e x\right )}{4 (-f)^{3/2} \sqrt{g}}\\ &=\frac{b e n \log (d+e x)}{4 f \left (e \sqrt{-f}+d \sqrt{g}\right ) \sqrt{g}}+\frac{b e n \log (d+e x)}{4 \left (e (-f)^{3/2}+d f \sqrt{g}\right ) \sqrt{g}}-\frac{a+b \log \left (c (d+e x)^n\right )}{4 f \sqrt{g} \left (\sqrt{-f}-\sqrt{g} x\right )}+\frac{a+b \log \left (c (d+e x)^n\right )}{4 f \sqrt{g} \left (\sqrt{-f}+\sqrt{g} x\right )}-\frac{b e n \log \left (\sqrt{-f}-\sqrt{g} x\right )}{4 f \left (e \sqrt{-f}+d \sqrt{g}\right ) \sqrt{g}}-\frac{\left (a+b \log \left (c (d+e x)^n\right )\right ) \log \left (\frac{e \left (\sqrt{-f}-\sqrt{g} x\right )}{e \sqrt{-f}+d \sqrt{g}}\right )}{4 (-f)^{3/2} \sqrt{g}}-\frac{b e n \log \left (\sqrt{-f}+\sqrt{g} x\right )}{4 \left (e (-f)^{3/2}+d f \sqrt{g}\right ) \sqrt{g}}+\frac{\left (a+b \log \left (c (d+e x)^n\right )\right ) \log \left (\frac{e \left (\sqrt{-f}+\sqrt{g} x\right )}{e \sqrt{-f}-d \sqrt{g}}\right )}{4 (-f)^{3/2} \sqrt{g}}+\frac{b n \text{Li}_2\left (-\frac{\sqrt{g} (d+e x)}{e \sqrt{-f}-d \sqrt{g}}\right )}{4 (-f)^{3/2} \sqrt{g}}-\frac{b n \text{Li}_2\left (\frac{\sqrt{g} (d+e x)}{e \sqrt{-f}+d \sqrt{g}}\right )}{4 (-f)^{3/2} \sqrt{g}}\\ \end{align*}
Mathematica [A] time = 1.39975, size = 407, normalized size = 0.81 \[ \frac{1}{4} \left (\frac{b n \text{PolyLog}\left (2,-\frac{\sqrt{g} (d+e x)}{e \sqrt{-f}-d \sqrt{g}}\right )}{(-f)^{3/2} \sqrt{g}}+\frac{b f n \text{PolyLog}\left (2,\frac{\sqrt{g} (d+e x)}{d \sqrt{g}+e \sqrt{-f}}\right )}{(-f)^{5/2} \sqrt{g}}+\frac{f \log \left (\frac{e \left (\sqrt{-f}-\sqrt{g} x\right )}{d \sqrt{g}+e \sqrt{-f}}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{(-f)^{5/2} \sqrt{g}}+\frac{\log \left (\frac{e \left (\sqrt{-f}+\sqrt{g} x\right )}{e \sqrt{-f}-d \sqrt{g}}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{(-f)^{3/2} \sqrt{g}}+\frac{a+b \log \left (c (d+e x)^n\right )}{f \left (\sqrt{-f} \sqrt{g}+g x\right )}+\frac{a+b \log \left (c (d+e x)^n\right )}{f g x+(-f)^{3/2} \sqrt{g}}+\frac{b e n \left (\log (d+e x)-\log \left (\sqrt{-f}-\sqrt{g} x\right )\right )}{d f g+e \sqrt{-f} f \sqrt{g}}+\frac{b e n \left (\log (d+e x)-\log \left (\sqrt{-f}+\sqrt{g} x\right )\right )}{d f g+e (-f)^{3/2} \sqrt{g}}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] time = 0.61, size = 1666, normalized size = 3.3 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{b \log \left ({\left (e x + d\right )}^{n} c\right ) + a}{g^{2} x^{4} + 2 \, f g x^{2} + f^{2}}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{b \log \left ({\left (e x + d\right )}^{n} c\right ) + a}{{\left (g x^{2} + f\right )}^{2}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]